<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>Document</title>
  </head>
  <body>
    <script>
      // delete 关键词从对象中删除属性：
      var obj = {
        name: "可可",
        "type-dog": "阿拉斯加犬",
        color: "rufous",
        age: 5,
        bark: function () {
          console.log("汪汪汪");
        },
      };

      delete obj.color;
      delete obj["type-dog"];
      delete obj["age"];
      console.log(obj);
    </script>
  </body>
</html>
